from rest_framework.permissions import BasePermission
class AdminPermission(BasePermission):
    def has_permission(self,request,view):
        if request.user.role == None:
            return False
            print(request.user.role)
        return True